<!DOCTYPE html>
<html>
<head>
  <title>KeyList.java</title>
  <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>
  <link rel='stylesheet' type='text/css' href='../../../../../coverage.css'/>
  <link rel='shortcut icon' type='image/png' href='../../../../../logo.png'/>
  <script type='text/javascript' src='../../../../../coverage.js'></script>
  <script type='text/javascript' src='../../../../../prettify.js'></script>
</head>
<body onload='prettyPrint()'>
  <table cellpadding='0' cellspacing='1'>
    <caption>igraph_client_java/src/main/java/com/taobao/igraph/client/model/KeyList.java</caption>
    <tr>
      <td class='line'>1</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>package com.taobao.igraph.client.core.model;</pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'></td><td>&nbsp;</td>
      <td><pre class='imports prettyprint' onclick='showHideLines(this)'><div>import lombok.NonNull;

import com.taobao.igraph.client.common.IGraphClientException;
import com.taobao.igraph.client.common.URLCodecUtil;

import java.util.Arrays;
</div><span>import ...</span></pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'>10</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>public class KeyList {</pre></td>
    </tr>
    <tr>
      <td class='line'>11</td><td class='count'>1</td>
      <td><pre class='prettyprint covered' id='l11s0'>    private StringBuilder ss = new StringBuilder();</pre></td>
    </tr>
    <tr>
      <td class='line'>12</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    private String pkey;</pre></td>
    </tr>
    <tr>
      <td class='line'>13</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    private String[] skeys;</pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'>15</td><td class='count'>2</td>
      <td><pre class='prettyprint jmp'>    <span id='l15s0' title='Executions: 2' class='covered'>public KeyList(@NonNull String pkey) {</span></pre></td>
    </tr>
    <tr>
      <td class='line'>16</td><td class='count'>1</td>
      <td><pre class='prettyprint covered' id='l16s0'>        ss.append(URLCodecUtil.encode(pkey));</pre></td>
    </tr>
    <tr>
      <td class='line'>17</td><td class='count'>1</td>
      <td><pre class='prettyprint covered' id='l17s0'>        this.pkey = pkey;</pre></td>
    </tr>
    <tr>
      <td class='line'>18</td><td class='count'>1</td>
      <td><pre class='prettyprint covered' id='l18s0'>    }</pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'>20</td><td class='count'>0</td>
      <td><pre class='prettyprint jmp'>    <span id='l20s0' title='Executions: 0' class='uncovered'>public KeyList(@NonNull String pkey, @NonNull String... skeys) {</span></pre></td>
    </tr>
    <tr>
      <td class='line'>21</td><td class='count'>0</td>
      <td><pre class='prettyprint jmp'>        <span id='l21s0' title='Executions: 0' class='uncovered'>if (skeys.length == 0)</span> {</pre></td>
    </tr>
    <tr>
      <td class='line'>22</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l22s0'>            throw new IGraphClientException("empty skeys in not allowed!");</pre></td>
    </tr>
    <tr>
      <td class='line'>23</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>        }</pre></td>
    </tr>
    <tr>
      <td class='line'>24</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l24s0'>        ss.append(URLCodecUtil.encode(pkey)).append(":");</pre></td>
    </tr>
    <tr>
      <td class='line'>25</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l25s0'>        boolean first = true;</pre></td>
    </tr>
    <tr>
      <td class='line'>26</td><td class='count'>0</td>
      <td><pre class='prettyprint jmp'>        <span id='l26s0' title='Executions: 0' class='uncovered'>for (String skey</span> : <span id='l26s1' title='Executions: 0' class='uncovered'>skeys)</span> {</pre></td>
    </tr>
    <tr>
      <td class='line'>27</td><td class='count'>0</td>
      <td><pre class='prettyprint jmp'>            <span id='l27s0' title='Executions: 0' class='uncovered'>if (!first)</span> {</pre></td>
    </tr>
    <tr>
      <td class='line'>28</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l28s0'>                ss.append("|");</pre></td>
    </tr>
    <tr>
      <td class='line'>29</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>            }</pre></td>
    </tr>
    <tr>
      <td class='line'>30</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l30s0'>            first = false;</pre></td>
    </tr>
    <tr>
      <td class='line'>31</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l31s0'>            ss.append(URLCodecUtil.encode(skey));</pre></td>
    </tr>
    <tr>
      <td class='line'>32</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>        }</pre></td>
    </tr>
    <tr>
      <td class='line'>33</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l33s0'>        this.pkey = pkey;</pre></td>
    </tr>
    <tr>
      <td class='line'>34</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l34s0'>        this.skeys = skeys;</pre></td>
    </tr>
    <tr>
      <td class='line'>35</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l35s0'>    }</pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'>37</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    @Override</pre></td>
    </tr>
    <tr>
      <td class='line'>38</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    public String toString() {</pre></td>
    </tr>
    <tr>
      <td class='line'>39</td><td class='count'>1</td>
      <td><pre class='prettyprint covered' id='l39s0'>        return ss.toString();</pre></td>
    </tr>
    <tr>
      <td class='line'>40</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    }</pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'>42</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    @Override</pre></td>
    </tr>
    <tr>
      <td class='line'>43</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    public boolean equals(Object o) {</pre></td>
    </tr>
    <tr>
      <td class='line'>44</td><td class='count'>0</td>
      <td><pre class='prettyprint jmp'>        <span id='l44s0' title='Executions: 0' class='uncovered'>if (this == o)</span> <span id='l44s1' title='Executions: 0' class='uncovered'>return true;</span></pre></td>
    </tr>
    <tr>
      <td class='line'>45</td><td class='count'>0</td>
      <td><pre class='prettyprint jmp'>        <span id='l45s0' title='Executions: 0' class='uncovered'>if (!(o instanceof KeyList))</span> <span id='l45s1' title='Executions: 0' class='uncovered'>return false;</span></pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'>47</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l47s0'>        KeyList keyList = (KeyList) o;</pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'>49</td><td class='count'>0</td>
      <td><pre class='prettyprint jmp'>        <span id='l49s0' title='Executions: 0' class='uncovered'>if (pkey != null</span> ? <span id='l49s1' title='Executions: 0' class='uncovered'>!pkey.equals(keyList.pkey)</span> : <span id='l49s2' title='Executions: 0' class='uncovered'>keyList.pkey != null)</span> <span id='l49s3' title='Executions: 0' class='uncovered'>return false;</span></pre></td>
    </tr>
    <tr>
      <td class='line'>50</td><td>&nbsp;</td>
      <td><pre class='comment'>        // Probably incorrect - comparing Object[] arrays with Arrays.equals</pre></td>
    </tr>
    <tr>
      <td class='line'>51</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l51s0'>        return Arrays.equals(skeys, keyList.skeys);</pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'>53</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    }</pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'>55</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    @Override</pre></td>
    </tr>
    <tr>
      <td class='line'>56</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    public int hashCode() {</pre></td>
    </tr>
    <tr>
      <td class='line'>57</td><td class='count'>0</td>
      <td><pre class='prettyprint jmp'>        <span id='l57s0' title='Executions: 0' class='uncovered'>int result = pkey != null</span> ? pkey.hashCode() : 0;</pre></td>
    </tr>
    <tr>
      <td class='line'>58</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l58s0'>        result = 31 * result + Arrays.hashCode(skeys);</pre></td>
    </tr>
    <tr>
      <td class='line'>59</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l59s0'>        return result;</pre></td>
    </tr>
    <tr>
      <td class='line'>60</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    }</pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'>62</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    public String getPkey() {</pre></td>
    </tr>
    <tr>
      <td class='line'>63</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l63s0'>        return pkey;</pre></td>
    </tr>
    <tr>
      <td class='line'>64</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    }</pre></td>
    </tr>
    <tr><td class='line'></td><td colspan='2'>&nbsp;</td></tr>
    <tr>
      <td class='line'>66</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    public String[] getSkeys() {</pre></td>
    </tr>
    <tr>
      <td class='line'>67</td><td class='count'>0</td>
      <td><pre class='prettyprint uncovered' id='l67s0'>        return skeys;</pre></td>
    </tr>
    <tr>
      <td class='line'>68</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>    }</pre></td>
    </tr>
    <tr>
      <td class='line'>69</td><td>&nbsp;</td>
      <td><pre class='prettyprint'>}</pre></td>
    </tr>
  </table>
</body>
</html>
